
package com.wl.config;

import com.arcsoft.face.FaceEngine;
import com.arcsoft.face.enums.ErrorInfo;

/**
 * 设备引擎激活
 */
public class FaceActivation {

    public static void main(String[] args) {
        String appId = "B5WqtjQFXgbiCudRSSTUALvYDP2A16zcguGuFRnneGQu";
        String sdkKey = "H2cKpa4V9TqoqTXzAqQ3t2rdwHsgxma7ktwPJoXt89hF";

        FaceEngine faceEngine = new FaceEngine("C://Users/wulei/Desktop/ArcSoft_ArcFace_Java_Windows_x64_V3.0/libs/WIN64");
        //激活引擎
        int activeCode = faceEngine.activeOnline(appId, sdkKey);

        if (activeCode != ErrorInfo.MOK.getValue() && activeCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()) {
            System.out.println("引擎激活失败");
        } else {
            System.out.println("引擎激活成功");
        }
    }
}


